package com.shujia.day16.sjms.oneobj1;

public class Student {
    private static Student student = new Student("学生");

    String name;

    private Student(String name) {
        this.name = name;
    }

    public static Student getStudent(String name){
        student.name = name;
        return student;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                '}';
    }
}
